package cn.echoedu.util;

import java.sql.Connection;

import cn.echoedu.dao.ConnectionClass;

public class DBInstance {
	 
	private    ConnectionClass connectionclass;
	private   Connection connection;
	public DBInstance(){
		connectionclass=new ConnectionClass();
	}
	 
	 
	public   Connection getConnection()
	{
		 Connection connection =  connectionclass.getConnection();
		L.p("Connection1"+connection);
		return connection;
	}
	public synchronized  void rollBackAndClose(Connection con){
		connectionclass.rollBackAndClose(con);
	}
	public synchronized  void commitAndClose(Connection con){
		connectionclass.commitAndClose(con);	
	}

}
